<template>
  <div class="maintenanceDeploy-basic">
    <el-dialog title="新增工单" :visible="value" width="630px" center @close="close">
      <el-form ref="ruleForm">
        <el-form-item label="设备编号:" prop="name1">
          <el-input-number v-model="num" controls-position="right" :min="1" :max="10" @change="handleChange" />
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button size="medium" class="custom-button2" type="primary" @click="close">取消</el-button>
        <el-button type="primary" size="medium" class="custom-button">确定</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
export default {
  name: 'MaintenanceDeploy',
  props: {
    value: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      num: 1
    }
  },
  methods: {
    close() {
      // 通知父组件关闭弹窗
      this.$emit('input', false)
      // 只对有校验的表单才会清空
      // this.$refs.fromRef.resetFields()
      // 将数据初始化,表单就会清空
      // this.form = this.$options.data().form
      // 需要清空一下这个id,不然在进行添加这个id会一直存在就一直编辑
      // this.$emit('update:edit-id', null)
    },
    handleChange(value) {
      console.log(value)
    }
  }
}
</script>
<style lang='scss'  >
 .maintenanceDeploy-basic{
  .el-dialog{
    border-radius: 10px;
    padding: 20px;
  .el-input__inner{
      width: 396px;
    }
    .el-textarea{
      width: 88%;
    }
    .el-input-number{
      width: 396px;
    }
       .custom-button {
    width: 80px;
    height: 36px;
    padding: 5px;
    border: 0px solid #fff;
    background: linear-gradient(135deg,#ff9743,#ff5e20)!important;
    }
   .custom-button:hover{
 background: linear-gradient(135deg,#ff7d43,#db3602)!important;
    }
    .custom-button2{
      color: #655b56;
    width: 80px;
    height: 36px;
    padding: 5px;
    border: 0px solid #fff;
    background-color: #fbf4f0;
    }
    .custom-button2:hover{
    background-color: #f3e7e1;
    }
  }
}
</style>
